package start;

import java.net.ConnectException;
import java.sql.SQLException;

import db.adapter.DbAdapter;
import db.adapter.DbAdapterMySql;
import db.adapter.DbConfig;

import gui.BaseFrame;

public class Main {

	public static void main(String []arg) throws InstantiationException, IllegalAccessException, ClassNotFoundException{
		DbConfig conf = DbConfig.getInstance();
		String[] params = new String[] { "localhost", "1521", "root", "",
				"test" };
		conf.setParams(params);
		System.out.println(conf.getParams(DbConfig.HOST));
		System.out.println(conf.getParams(DbConfig.USER));

		DbConfig c = DbConfig.getInstance();
		System.out.println(c.getParams(DbConfig.USER));
		DbAdapter db = new DbAdapterMySql();
		try {
			BaseFrame frame=new BaseFrame();
		} catch (SQLException e) {
			System.out.println("eroare la conectiune");
			System.out.println(e.toString());
		}
	}
}
